package com.dmxh;

 class parentClass {
     void ParentMethod(){
         System.out.println("thisParentMethod");
     }
}

class childClass extends parentClass{
    void childMethod(){
        System.out.println("thisChildMethod");
    }
}

public class Main{
     public static void main(String[] args){
         childClass childClass = new childClass();
         //可以调用子类方法
         childClass.childMethod();
         //可以调用父类方法
         childClass.ParentMethod();
     }
}
